<template>
    <div id="app"> 
     
            <div id="lshz">
                <h3>历史记录    <van-icon name="delete-o" @click="shanchu" /></h3>
             <div id="lishi">
                <van-tag  plain type="default" v-for="(item,index) in lishijilu" :key="index" @click="fun1(item)">{{item}}</van-tag>
             </div>
                
            </div>
        
            <div id="rmhz">
                <h3>热门搜索</h3>
                <van-tag plain  :type="item.is_hot?'danger':'default'" v-for="(item,index) in remensousuo " :key="index" @click="fun1(item.keyword)">{{item.keyword}}</van-tag>
            </div>
      
      
     
    </div>
</template>

<script>

export default {
    data() {
        return {
            lssousuo:''
        };
    },
    props:['lishijilu','remensousuo']  ,
    mounted() {
        
    },

    methods: {
        fun1(item){
            // console.log(item);
            this.lssousuo=item
            this.$emit('lssousuo',this.lssousuo)
        },
        shanchu(){
            // console.log(1);
            // this.lssousuo='1'
            // Toast.success('成功文案');
            document.getElementById('lishi').style.display='none'
        }
    },
};
</script>

<style scoped>
    #lshz{
        width: 100%;
        
        background-color: #ffffff;
        margin-top:-20px ;
    }
    #rmhz{
        width: 100%;
        
        background-color: #ffffff;
      
    }
    .van-tag{
        margin-left:8px ;
        margin-bottom:5px ;
    }
</style>